package _97DieDaiQi;

import _97DieDaiQi.impl.NameRepository;

/**
 * @Test: 迭代器模式 测试类
 * @author: ZBoHang
 * @time: 2021/9/17 14:25
 */
class Test {
    public static void main(String[] args) {
        String[] names = {"qq","ww","ee","rr","tt","yy",null};
        NameRepository nameRepository = new NameRepository(names);
        Iterator iterator = nameRepository.getIterator();
        while (iterator.hasNext()) {
            String name = String.valueOf(iterator.next());
            System.out.println(name);
        }
    }
}
